<?php

namespace home\models;

use ijony\helpers\Image;
use Yii;

/**
 * This is the model class for table "{{%case_galleries}}".
 *
 * @property string $case_id 案例 ID
 * @property string $file 图片
 */
class CaseGalleries extends \common\models\CaseGalleries
{

    public function getImageUrl($width = 0, $height = 0, $cut = true)
    {
        return Image::getImg($this->file, $width, $height, true, $cut ? Image::THUMB_MODE_CUT : Image::THUMB_MODE_ADAPT);
    }
}
